cmake_minimum_required(VERSION 2.6)

project(flashbulb)

set(flashbulb_SRCS
  Object.cpp)

if(CMAKE_BUILD_TYPE STREQUAL Release)
  add_definitions(-DNDEBUG)
endif(CMAKE_BUILD_TYPE STREQUAL Release)

set(CMAKE_C_FLAGS "-ansi -Wall -Wextra -Werror -pedantic-errors -pipe")
set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})

set(CMAKE_C_FLAGS_DEBUG "-g3 -O0")
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})

set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")

find_package(ICU REQUIRED)
include_directories(${ICU_INCLUDE_DIRS})
set(LIBS ${ICU_LIBRARIES})

find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
list(APPEND LIBS ${Boost_LIBRARIES})

add_library(flashbulb SHARED ${flashbulb_SRCS})
target_link_libraries(flashbulb ${LIBS})

